#include "MCWheelArgs.h"
#include <qgraphicsview.h>
#include <MCPoint2D.h>

MCWheelArgs::MCWheelArgs(QWheelEvent *event, ICanvas *presenter) :
    _event(event),
    _presenter(presenter)
{
}

double MCWheelArgs::delta()
{
    return _event->angleDelta().y();
}

MCPoint2D MCWheelArgs::position() const
{
    MCPoint2D p(_event->position().x(), _event->position().y());
    return p;
}

MCPoint2D MCWheelArgs::globalPosition() const
{
    MCPoint2D p(_event->position().x(), _event->position().y());
    return _presenter->worldToScreen(p);
}
